package soal1;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

public class PetStroreTestDrive {
	private static PetStore p = new PetStore();
	
	public static void main(String[] args){
//		p.setCustomerName(args[0]);
//		p.setPetType(args[1]);
//		p.setPetName(args[2]);
//		p.setBreed(args[3]);
		
//		StringBuffer sb = new StringBuffer();
//		sb.append(p.getCustomerName());
//		sb.append(" buys a ");
//		sb.append(p.getPetType());
//		sb.append(" at the FunnyPet petstore. the ");
//		sb.append(p.getPetType());
//		sb.append(" name is ");
//		sb.append(p.getPetName());
//		sb.append(". It's breed is ");
//		sb.append(p.getBreed());
//		sb.append(".");
//		
//		System.out.println(sb);
//		System.out.println(p);
		
		/*
		System.out.println(p.getCustomerName() + " buys a " 
				+ p.getPetType() + " at the FunnyPet pet store. "
				+ "the " + p.getPetType() + " name is " + p.getPetName()
				+ ". It's breed is " + p.getBreed());
		*/
		
//		PetStore p1 = new PetStore();
//		p1.setBreed("TEST");
//		PetStore p2 = new PetStore();
//		p2.setBreed("TEST");
//		
//		System.out.println(p1.getBreed().equals(p2.getBreed()));
		
		String s1 = "STRING 2";
		String s2 = "STR1";
		
		System.out.println(s1.compareTo(s2));
	}
	
	static class PetStore {
		private String customerName;
		private String petName;
		private String petType;
		private String breed;
		public String getCustomerName() {
			return customerName;
		}
		public void setCustomerName(String customerName) {
			this.customerName = customerName;
		}
		public String getPetName() {
			return petName;
		}
		public void setPetName(String petName) {
			this.petName = petName;
		}
		public String getPetType() {
			return petType;
		}
		public void setPetType(String petType) {
			this.petType = petType;
		}
		public String getBreed() {
			return breed;
		}
		public void setBreed(String breed) {
			this.breed = breed;
		}
		@Override
		public String toString() {
			return "PetStore [customerName=" + customerName + ", petName="
					+ petName + ", petType=" + petType + ", breed=" + breed + "]";
		}
		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + ((breed == null) ? 0 : breed.hashCode());
			result = prime * result
					+ ((customerName == null) ? 0 : customerName.hashCode());
			result = prime * result
					+ ((petName == null) ? 0 : petName.hashCode());
			result = prime * result
					+ ((petType == null) ? 0 : petType.hashCode());
			return result;
		}
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			PetStore other = (PetStore) obj;
			if (breed == null) {
				if (other.breed != null)
					return false;
			} else if (!breed.equals(other.breed))
				return false;
			if (customerName == null) {
				if (other.customerName != null)
					return false;
			} else if (!customerName.equals(other.customerName))
				return false;
			if (petName == null) {
				if (other.petName != null)
					return false;
			} else if (!petName.equals(other.petName))
				return false;
			if (petType == null) {
				if (other.petType != null)
					return false;
			} else if (!petType.equals(other.petType))
				return false;
			return true;
		}
		
		
		
	}
}
